//
//  NetWorkProblemView.m
//  YiGuo
//
//  Created by sam lau on 17/4/24.
//  Copyright © 2017年 sam lau. All rights reserved.
//

#import "NetWorkProblemView.h"

@implementation NetWorkProblemView

-(instancetype)initWithFrame:(CGRect)frame{
    if(self == [super initWithFrame:frame]){
        
        self.backgroundColor = [UIColor whiteColor];
        UIImageView *imageView = [UIImageView new];
        [self addSubview:imageView];
        self.imageView = imageView;
        imageView.image = [UIImage imageNamed:@"load"];
        
        
        UILabel *label = [UILabel new];
        [self addSubview:label];
        self.label = label;
        label.text = [NSString stringWithFormat:@"网络问题"];
        label.font = CHINESE_PingFangRegular(18);
        label.textColor = CellColor2;
        label.textAlignment = NSTextAlignmentCenter;
        
        
        
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    
    self.imageView.sam_size = CGSizeMake(150, 150);
    self.imageView.center = CGPointMake(self.sam_centerX, self.sam_centerY - 70);
    self.label.sam_size = CGSizeMake(200, 40);
    self.label.center = CGPointMake(self.sam_centerX, self.imageView.sam_maxY + 30);
    
}

@end
